<?php
/**
 * Created by PhpStorm.
 * User: saive
 * Date: 16-4-28
 * Time: 下午11:58
 */

$template = '
server {
	listen 80;
	#listen [::]:80 default_server;
	#Alias:{{alias}}:sailA;
	root {{workspace}};
	# Add index.php to the list if you are using PHP
	index index.html index.htm index.php index.nginx-debian.html;
	server_name {{domain}};
	location / {
		# First attempt to serve request as file, then
		# as directory, then fall back to displaying a 404.
		try_files $uri $uri/ =404;
	}

	# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
	#
	location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$; 
        fastcgi_pass unix:/var/run/php5-fpm.sock; 
        fastcgi_index index.php; 
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
        include fastcgi_params; 
	}
}
    ';

?>